load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

oncall("fboss_platform")

python_library(
    name = "fixmyfboss_library",
    srcs = [
        "check.py",
        "config.py",
        "platform_name_lib.py",
        "remediation.py",
        "status.py",
        "utils.py",
    ] + glob(["modules/*.py"]),
    resources = {
        "//fboss/platform:configs": "fboss_config_files",
    },
    deps = [
        "fbsource//third-party/pypi/dataclasses-json:dataclasses-json",
        "//fboss/platform/platform_manager:platform_manager_config-python-types",
        "//thrift/lib/py3:types",
    ],
)

python_binary(
    name = "fixmyfboss",
    srcs = ["main.py"],
    main_function = "fboss.util.fixmyfboss.main.main",
    deps = [
        ":cli_wrapper",
        ":fixmyfboss_library",
    ],
)

python_library(
    name = "cli_wrapper",
    srcs = ["cli_wrapper.py"],
    labels = ["autodeps2_generated"],
)
